Integrand size = 21, antiderivative size = 131 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {2 a^2 \cos (c+d x)}{d}+\frac {3 a^2 \cos ^2(c+d x)}{d}-\frac {3 a^2 \cos ^4(c+d x)}{2 d}-\frac {2 a^2 \cos ^5(c+d x)}{5 d}+\frac {a^2 \cos ^6(c+d x)}{3 d}+\frac {a^2 \cos ^7(c+d x)}{7 d}-\frac {2 a^2 \log (\cos (c+d x))}{d}+\frac {a^2 \sec (c+d x)}{d} \]
[Out]
Time = 0.20 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3957, 2915, 12, 90} \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {a^2 \cos ^7(c+d x)}{7 d}+\frac {a^2 \cos ^6(c+d x)}{3 d}-\frac {2 a^2 \cos ^5(c+d x)}{5 d}-\frac {3 a^2 \cos ^4(c+d x)}{2 d}+\frac {3 a^2 \cos ^2(c+d x)}{d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {a^2 \sec (c+d x)}{d}-\frac {2 a^2 \log (\cos (c+d x))}{d} \]
[In]
[Out]
Rule 12
Rule 90
Rule 2915
Rule 3957
Rubi steps \begin{align*} \text {integral}& = \int (-a-a \cos (c+d x))^2 \sin ^5(c+d x) \tan ^2(c+d x) \, dx \\ & = \frac {\text {Subst}\left (\int \frac {a^2 (-a-x)^3 (-a+x)^5}{x^2} \, dx,x,-a \cos (c+d x)\right )}{a^7 d} \\ & = \frac {\text {Subst}\left (\int \frac {(-a-x)^3 (-a+x)^5}{x^2} \, dx,x,-a \cos (c+d x)\right )}{a^5 d} \\ & = \frac {\text {Subst}\left (\int \left (-2 a^6+\frac {a^8}{x^2}-\frac {2 a^7}{x}+6 a^5 x-6 a^3 x^3+2 a^2 x^4+2 a x^5-x^6\right ) \, dx,x,-a \cos (c+d x)\right )}{a^5 d} \\ & = \frac {2 a^2 \cos (c+d x)}{d}+\frac {3 a^2 \cos ^2(c+d x)}{d}-\frac {3 a^2 \cos ^4(c+d x)}{2 d}-\frac {2 a^2 \cos ^5(c+d x)}{5 d}+\frac {a^2 \cos ^6(c+d x)}{3 d}+\frac {a^2 \cos ^7(c+d x)}{7 d}-\frac {2 a^2 \log (\cos (c+d x))}{d}+\frac {a^2 \sec (c+d x)}{d} \\ \end{align*}
Time = 0.39 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.82 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {a^2 (25725+11760 \cos (2 (c+d x))+5250 \cos (3 (c+d x))-588 \cos (4 (c+d x))-770 \cos (5 (c+d x))-48 \cos (6 (c+d x))+70 \cos (7 (c+d x))+15 \cos (8 (c+d x))-70 \cos (c+d x) (5+384 \log (\cos (c+d x)))) \sec (c+d x)}{13440 d} \]
[In]
[Out]
Time = 2.05 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.15
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{8}}{\cos \left (d x +c \right )}+\left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{6}}{6}-\frac {\sin \left (d x +c \right )^{4}}{4}-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7}}{d}\) | \(151\) |
default | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{8}}{\cos \left (d x +c \right )}+\left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{6}}{6}-\frac {\sin \left (d x +c \right )^{4}}{4}-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7}}{d}\) | \(151\) |
parts | \(-\frac {a^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7 d}+\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{8}}{\cos \left (d x +c \right )}+\left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )\right )}{d}+\frac {2 a^{2} \left (-\frac {\sin \left (d x +c \right )^{6}}{6}-\frac {\sin \left (d x +c \right )^{4}}{4}-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(156\) |
parallelrisch | \(\frac {a^{2} \left (26880 \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \cos \left (d x +c \right )-26880 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (d x +c \right )-26880 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (d x +c \right )+32314 \cos \left (d x +c \right )+5250 \cos \left (3 d x +3 c \right )+15 \cos \left (8 d x +8 c \right )+70 \cos \left (7 d x +7 c \right )-770 \cos \left (5 d x +5 c \right )-48 \cos \left (6 d x +6 c \right )-588 \cos \left (4 d x +4 c \right )+11760 \cos \left (2 d x +2 c \right )+25725\right )}{13440 d \cos \left (d x +c \right )}\) | \(164\) |
risch | \(2 i a^{2} x +\frac {29 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{64 d}+\frac {117 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{128 d}+\frac {117 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{128 d}+\frac {29 a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{64 d}+\frac {4 i a^{2} c}{d}+\frac {2 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {2 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}+\frac {a^{2} \cos \left (7 d x +7 c \right )}{448 d}+\frac {a^{2} \cos \left (6 d x +6 c \right )}{96 d}-\frac {3 a^{2} \cos \left (5 d x +5 c \right )}{320 d}-\frac {a^{2} \cos \left (4 d x +4 c \right )}{8 d}-\frac {5 a^{2} \cos \left (3 d x +3 c \right )}{64 d}\) | \(222\) |
norman | \(\frac {-\frac {192 a^{2}}{35 d}-\frac {64 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}}{d}-\frac {24 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{d}-\frac {172 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{3 d}-\frac {264 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5 d}-\frac {292 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{15 d}-\frac {1012 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{35 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{7}}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}+\frac {2 a^{2} \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{d}\) | \(237\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.98 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {120 \, a^{2} \cos \left (d x + c\right )^{8} + 280 \, a^{2} \cos \left (d x + c\right )^{7} - 336 \, a^{2} \cos \left (d x + c\right )^{6} - 1260 \, a^{2} \cos \left (d x + c\right )^{5} + 2520 \, a^{2} \cos \left (d x + c\right )^{3} + 1680 \, a^{2} \cos \left (d x + c\right )^{2} - 1680 \, a^{2} \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) - 875 \, a^{2} \cos \left (d x + c\right ) + 840 \, a^{2}}{840 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
Timed out. \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.82 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {30 \, a^{2} \cos \left (d x + c\right )^{7} + 70 \, a^{2} \cos \left (d x + c\right )^{6} - 84 \, a^{2} \cos \left (d x + c\right )^{5} - 315 \, a^{2} \cos \left (d x + c\right )^{4} + 630 \, a^{2} \cos \left (d x + c\right )^{2} + 420 \, a^{2} \cos \left (d x + c\right ) - 420 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) + \frac {210 \, a^{2}}{\cos \left (d x + c\right )}}{210 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 320 vs. \(2 (123) = 246\).
Time = 0.37 (sec) , antiderivative size = 320, normalized size of antiderivative = 2.44 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {420 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - 420 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {420 \, {\left (2 \, a^{2} + \frac {a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}}{\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1} + \frac {357 \, a^{2} - \frac {3759 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {16737 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {42595 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {43855 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {25389 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {8043 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {1089 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1\right )}^{7}}}{210 \, d} \]
[In]
[Out]
Time = 14.31 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.80 \[ \int (a+a \sec (c+d x))^2 \sin ^7(c+d x) \, dx=\frac {2\,a^2\,\cos \left (c+d\,x\right )+\frac {a^2}{\cos \left (c+d\,x\right )}+3\,a^2\,{\cos \left (c+d\,x\right )}^2-\frac {3\,a^2\,{\cos \left (c+d\,x\right )}^4}{2}-\frac {2\,a^2\,{\cos \left (c+d\,x\right )}^5}{5}+\frac {a^2\,{\cos \left (c+d\,x\right )}^6}{3}+\frac {a^2\,{\cos \left (c+d\,x\right )}^7}{7}-2\,a^2\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \]
[In]
[Out]